<?php if ($this->_var['full_page']): ?>
<?php echo $this->fetch('pageheader.htm'); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'../js/utils.js,listtable.js')); ?>
<!-- 品牌搜索 -->
<?php echo $this->fetch('brand_search.htm'); ?>

<form method="post" action="" name="listForm">
    <div class="list-div" id="listDiv">
<?php endif; ?>
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th>id</th>
                <th>联系人</th>
                <th>手机</th>
                <th>联系电话</th>
                <th>公司名称</th>
                <th>采购需求</th>
                <th>购买时间</th>
                <th>操作</th>
            </tr>

            <?php $_from = $this->_var['company_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'company');if (count($_from)):
    foreach ($_from AS $this->_var['company']):
?>
            <tr>
                <td align="center"><?php echo $this->_var['company']['id']; ?></td>
                <td align="center"><?php echo $this->_var['company']['username']; ?></td>
                <td align="center"><?php echo $this->_var['company']['phone']; ?></td>
                <td align="center"><?php echo $this->_var['company']['tel']; ?></td>
                <td align="center"><?php echo $this->_var['company']['company_name']; ?></td>
                <td align="center"><?php echo $this->_var['company']['buying_demand']; ?></td>
                <td align="center"><?php echo $this->_var['company']['post_time']; ?></td>
                <td align="center">
                    <a href="company_order.php?act=edit&id=<?php echo $this->_var['company']['id']; ?>" >编辑</a> |
                    <a href="javascript:;" onclick="listTable.remove(<?php echo $this->_var['company']['id']; ?>, '<?php echo $this->_var['lang']['drop_confirm']; ?>')">移除</a>
                </td>
            </tr>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            
            <tr>
                <td align="right" nowrap="true" colspan="6">
                <?php echo $this->fetch('page.htm'); ?>
                </td>
            </tr>
    
        </table>
        
    <?php if ($this->_var['full_page']): ?>
    </div>
</form>
<script type="text/javascript" language="javascript">
  <!--
  listTable.recordCount = <?php echo $this->_var['record_count']; ?>;
  listTable.pageCount = <?php echo $this->_var['page_count']; ?>;

  <?php $_from = $this->_var['filter']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
  listTable.filter.<?php echo $this->_var['key']; ?> = '<?php echo $this->_var['item']; ?>';
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

  
  onload = function()
  {
      // 开始检查订单
      startCheckOrder();
  }
  
  //-->
</script>
    <?php echo $this->fetch('pagefooter.htm'); ?>
    <?php endif; ?>
